package com.flydog.mall.controller.ums;

import com.flydog.mall.common.api.CommonResult;
import com.flydog.mall.dto.RegisterUserInfoParam;
import com.flydog.mall.service.ums.UmsUserAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author Cao
 * @description 用户管理控制器
 * @create 2021-04-13
 */

@RestController
@RequestMapping("/admin")
public class UmsAdminController {

    @Autowired
    private UmsUserAdminService adminService;

    @PostMapping("/register")
    CommonResult<Integer> register(@RequestBody RegisterUserInfoParam userInfoParam) {
        return CommonResult.success(adminService.register(userInfoParam));
    }
}
